import request from '../utils/request';

//轮播图
// export const banner = query => {
//     return request({
//         url: 'https://test.365msmk.com/api/app/banner',
//         method: 'GET',
//         params: query
//     });
// };

//首页接口
export const lesson = query => {
    return request({
        url: 'https://test.365msmk.com/api/app/recommend/appIndex',
        method: 'GET',
        params: query
    });
};
//下拉分类接口
export const sort = query => {
    return request({
        url: 'https://test.365msmk.com/api/app/courseClassify',
        method: 'GET',
        params: query
    });
};
//下拉接口
export const pull= query => {
    return request({
        url: 'https://test.365msmk.com/api/app/courseBasis',
        method: 'GET',
        params: query
    });
};

//特色课-课程接口
export const goodat = (query,page) => {
    return request({
        url:  `https://test.365msmk.com/api/app/courseBasis?page=${page}`,
        method: 'GET',
        params: query
    });
};

//登录 
export const login =(query) => {
    return request({
        url: 'https://test.365msmk.com/api/app/login',
        method: 'POST',
        params: query
    });
};

//验证码登录接口
export const code = query => {
    return request({
        url: 'https://test.365msmk.com/api/app/smsCode',
        method: 'POST',
        params: query
    });
};
//oto接口
export const otodata = query => {
    return request({
        url: 'https://test.365msmk.com/api/app/otoCourse',
        method: 'GET',
        params: query
    });
};

//首页课程详情页接口
export const lessondetail = query => {
    return request({
        url: `https://test.365msmk.com/api/app/courseInfo/basis_id=${query}`,
        method: 'GET',
    });
};
//个人信息接口
export const personal = query => {
    return request({
        url:"https://test.365msmk.com/api/app/module/attribute/1?",
        method: 'GET',
    });
};

// 用户信息
export const Userinfo = query => {
    return request({
        url: `https://test.365msmk.com/api/app/userInfo?`,
        method: 'GET',
    });
};
//约课详情页接口
export const yuyuedetail = query => {
    return request({
        url: `https://test.365msmk.com/api/app/teacher?id=${query}`,
        method: 'GET',
    });
};


// 个人信息图片
export const Img = (query) => {
    return request({
        url: `https://test.365msmk.com/api/app/public/img`,
        method: 'POST',
        data:query
    });
};
// 修改个人信息图片
export const Imgnew = query => {
    return request({
        url: `https://test.365msmk.com/api/app/user`,
        method: 'PUT',
        data:query
    });
};
// 个人信息修改时间
export const Time = query => {
    return request({
        url: `https://test.365msmk.com/api/app/user`,
        method: 'PUT',
        data:query
    });
};

// 三级联动
export const Three = query => {
    return request({
        url: `https://test.365msmk.com/api/app/sonArea/0`,
        method: 'GET',
        data:query
    });
};






